package model.mediators;

import model.entity.Entity;

/**
 * When an entity needs to update the map when it loses a life, it uses this mediator to communicate with the map
 * because the entity does not know anything about the map.
 * @author Drew
 *
 */
public class DeathMediator extends MapMediator {
	
	public static void respawn(Entity dying) {
		MapMediator.getMap().removeEntityFromTile(dying, dying.getLocation());
		MapMediator.getMap().addEntityToTile(dying, dying.getRespawnPoint());
	}
	
	public static void death(Entity dying) {
		MapMediator.getMap().removeEntityFromTile(dying, dying.getLocation());
	}
	
}
